function [ s_swapped ] = swap(s, a, b)

    s_swapped = s;
    s_swapped(b) = s(a);
    s_swapped(a) = s(b);
end

